# -*- coding: utf-8 -*-

<%inherit file="../autohandler"/>
<%include file="toolPanel.myt"/>
<!--script language="javascript" src="/lib.js" type="text/javascript"></script-->

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr><td><div id="add" /></td></tr>
</table>
<table id="tbContent" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" class="BoxCenter">
  <tr class="headlineTextCenter"><td height="20" bgcolor="#C5CED9" width="5%">№</td>
    <td height="20" bgcolor="#C5CED9" width="50%">Наименование ресурса</td>
    <td height="20" bgcolor="#C5CED9" width="20%">Персона</td>
    <td height="20" bgcolor="#C5CED9" width="10%">Закзал</td>
    <td height="20" bgcolor="#C5CED9" width="10%">Срок заказа</td>
    <td height="20" bgcolor="#C5CED9" colspan="2" width="5%">Действия</td>
  </tr>
  <tr id="trNew"><td colspan="8">
      <div id="divNewItem"></div>
      <div id="divNewShowEdit"></div></td>
  </tr>
  <tr bgcolor="#F0F0F0"></tr>
%if c.card is not None:
    %for post in c.card:
      <tr bgcolor="#F0F0F0">
            <td height="20" class="bodyText">${ post.id }</td>
            <td height="20" class="bodyText">
                    ${ h.link_to_remote(post.biblio.name, dict(update="fullview%s" % post.id, url=h.url_for(action='fullview/%s' % post.id)))}
            </td>
            <td height="20" class="bodyText">
                    ${ h.link_to_remote(post.user.fio, dict(update="fullview%s" % post.id, url=h.url_for(action='fullview/%s' % post.id)))}
            </td>
            <td height="20" class="bodyText">
                    ${ h.link_to_remote(post.order_date, dict(update="fullview%s" % post.id, url=h.url_for(action='fullview/%s' % post.id)))}
            </td>
            <td height="20" class="bodyText">
                    ${ h.link_to_remote(post.order_expiry_date, dict(update="fullview%s" % post.id, url=h.url_for(action='fullview/%s' % post.id)))}
            </td>
            <td height="20" class="bodyText">
                    <input type="checkbox" name="${ post.id }" id="${ post.id }" value="${ post.id }" class="BoxCenter">
            </td>
            <td height="20" class="bodyText">
                    ${ h.link_to("<img border='0' src='/img/b_delrec.png' title='Удалить запись' alt='Удалить' width='16' height='16'>", url=h.url(action='delete', id=post.id), confirm='Вы действительно хотите стереть запись из карточки пользователя "%s"?' % post.user.fio) }
            </td>
      </tr>
      <tr id="trShowEdit${ post.id }">
              <td colspan="8" id="td${ post.id }">
                      <div id="fullview${ post.id }" />
      </td></tr>
    %endfor
%endif    
</table>
<%include file="toolPanel.myt"/>

